package com.gopay.common.cps.dao.entrust.impl;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.entrust.CardAuthenticationInfoDAO;
import com.gopay.common.cps.dao.entrust.CpsDSContractInfoQueryDAO;
import com.gopay.common.domain.cbrmb.CbRmbRetranmissRecord;
import com.gopay.common.domain.entrust.CardAuthenticationInfo;
import com.gopay.common.domain.entrust.EntrustContractInfo;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by sandyl on 2017/6/2.
 */
@Repository("cardAuthenticationInfoDAORCL")
public class CardAuthenticationInfoDAOImpl extends BaseDAOImpl<CardAuthenticationInfo, Serializable> implements CardAuthenticationInfoDAO {


    @Override
    public CardAuthenticationInfo findCardAuthenticationInfoByCardAuthNo(String cardAuthNo) {
        Map<String,Object> params = new HashMap<>();
        params.put("cardAuthNo", cardAuthNo);
        String hql = "from CardAuthenticationInfo m where m.cardAuthNo=:cardAuthNo";
        List<CardAuthenticationInfo> ss = findByHql(hql,params);
        return (null == ss || 0 == ss.size()) ? null : ss.get(0);
    }
}
